/**
 * Rainbow Tables Generator (Proof of concept)
 * 
 * @author Matheus Mendes aka bigodines
 * @date May, 2007
 * @description This is a small java Rainbow table generator based on 
 * 		RainbowCrack ( created by Zhu Shuanglei <shuanglei@hotmail.com> ) 
 **/

package bifrost;


/**
 * Generates the wordlist.
 * */
public class WordListGenerator {

	public WordListGenerator() {
		
	}
	
	public void createTable(char [] values, int size, int start) {
		StringBuffer str = new StringBuffer();
		this.generate(values, str, start, size);
	}
	
	private void generate(char[] values,  StringBuffer str, int step, int size) {
		//System.out.println("size:"+size+" step:"+step);
		if (step < size) { 
			for(int i=0; i < values.length; i++) {
				System.out.println(str.append(values[i]));				
				this.generate(values, str, step+1, size);				
				str.deleteCharAt(step);
			}			
			
		}
	}	
	
}
